package com.lwj.kotlin.remotelibrary.annotation;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import com.lwj.kotlin.remotelibrary.R;

public class Library_Annotation extends AppCompatActivity {

    @FindViewById(R.id.btnsay)
    @SetOnClickListener(id = R.id.btnsay, methodName = "click")
    private Button _btnSay;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_library__annotation);
        AnnotationParse.parse(this);
        this._btnSay.setText("世界  你好!");

        findViewById(R.id.btnsays).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                System.out.println("按钮点击2");
            }
        });

    }

    /**
     * 点击事件 2017/4/14 10:00
     */
    public void click() {
        Toast.makeText(this, "Hello world", Toast.LENGTH_SHORT).show();
    }
}
